/**
 * 
 */
package precision;

/**
 * @author Alex J. Bush, Richard J. Inskip, Benjamin T. Jones
 *
 * This interface abstracts the representation of the underlying precision types
 * and provides methods to interact the generic data type. This allows not to be
 * tied to a certain precision but can use any precision a user so wishes.
 */
public interface FPObj {

	// Primitive methods that need to be explicitly defined.
	
	/**
	 * Addition of b to FBObj
	 * @param b
	 * @return result
	 */
	public FPObj add(FPObj b);
	
	/**
	 * Subtraction of b from FBObj
	 * @param b
	 * @return result
	 */
	public FPObj sub(FPObj b);
	
	/**
	 * Division of FBObj by b
	 * @param b
	 * @return result
	 */
	public FPObj divide(FPObj b);
	
	/**
	 * Multiplication of FBObj by b
	 * @param b
	 * @return result
	 */
	public FPObj multi(FPObj b);
	
	/**
	 * Method to test if <code>this</code> FPObj is greater than FPObj b
	 * @param b An FPObj to check if <code>this</code> is greater than
	 * @return Boolean true if <code>this</code> is greater than b, false otherwise.
	 */
	public boolean greaterThan(FPObj b);
	
	/**
	 * Return the current object as a 4 byte floating point number (float)
	 * @return the current data types converted to a float
	 */
	public float toFloat();
	
	/**
	 * Return a new FPObj with the same precision as <code>this</code> with
	 * value as 0.
	 */
	public FPObj newFPObj();
	
	/**
	 * Return the absolute value of this number
	 */
	public FPObj abs();
	
	/**
	 * Return a new FPObj with the same precision as <code>this</code> with
	 * value as a.
	 */
	public FPObj newFPObj(int a);
	
	/**
	 * Return a String representing the value
	 * @return A string to represent the value
	 */
	public String toString();
	
	/**
	 * Return a String of the type of Class
	 * @return A string of the type
	 */
	public String toType();
}
